package com.example.utils;

import java.util.HashMap;
import java.util.Map;

//封装成前端返回的对象
public class generateResponse {
    public static Map<String, Object> generateResponse(int code, String message, Object data) {
        Map<String, Object> result = new HashMap<>();
        result.put("code", code);
        result.put("message", message);
        result.put("data", data);
        return result;
    }
}
